package com.wss.service.impl;

import com.wss.dao.BlogTypeDao;
import com.wss.domain.BlogType;
import com.wss.service.BlogTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("blogTypeService")
public class BlogTypeServiceImpl implements BlogTypeService {

    @Autowired
    private BlogTypeDao blogTypeDao;

    @Override
    public List<BlogType> findType() {
        System.out.println("业务层：查询所有博客类型信息...");
        return blogTypeDao.findType();
    }

    @Override
    public List<BlogType> findBlogTypeByBthid(int bth_id) {
        System.out.println("业务层：查询根据typeheader划分的博客类型信息...");
        return blogTypeDao.findBlogTypeByBthid(bth_id);
    }

    @Override
    public BlogType findBtypeNameByBtypeid(int btype_id) {
        System.out.println("业务层：根据Btype_id查询出博客分类名...");
        return blogTypeDao.findBtypeNameByBtypeid(btype_id);
    }
}
